package com.sgj.gulimall.auth.feign;

import com.sgj.common.utils.R;
import com.sgj.common.vo.MemberRegistVo;
import com.sgj.common.vo.SocialUser;
import com.sgj.common.vo.UserLoginVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: Guoji Shen
 * @Date: 2021/9/6 10:07
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 注册
     * @param vo
     * @return
     */
    @PostMapping("/member/member/register")
    R register(@RequestBody MemberRegistVo vo);

    /**
     * 登陆
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 社交账号登陆
     * @param socialUser
     * @return
     * @throws Exception
     */
    @PostMapping("/member/member/oauth/login")
    R oAuthLogin(@RequestBody SocialUser socialUser) throws Exception;
}